package 程序员面试金典;

import java.util.Arrays;

public class 峰与谷 {

    public void wiggleSort(int[] nums) {
        Arrays.sort(nums);
        for (int i = 0; i < nums.length; i+=2) {
            int temp=nums[i];
            nums[i]=nums[i+1];
            nums[i+1]=temp;
        }
    }
}
